class ResponseEntity {
    static CODE_SUCCESS = 1
    static CODE_ERROR = 0
    static success({ message, data } = {}) {
        let result = {}
        result.code = this.CODE_SUCCESS
       let msg= message ? message : '操作成功'
        result.msg = msg
       
        result.data = data
        return result
    }
    static error({message}={}) {
        let result={}
      let msg=message ? message : '操作失败'
        result.code =this.CODE_ERROR
        result.msg = msg
        return result
    }
}
module.exports = ResponseEntity